# -*- coding: utf-8 -*-
import openerp
from openerp.osv import fields,osv

class res_partner(osv.osv):
    _inherit = 'res.partner'
    _order = 'write_date desc'
    
    _columns = {
        'has_pur_invoice': fields.boolean("Has Purchase Invoice?"),
        'pur_invoice_rate': fields.integer('Purchase Invoice Rate'),
        'is_main_contact': fields.boolean('Main Contact'),
        'pur_inv_paper_rate': fields.integer('采购开票票面税率(%)'),
        'name': fields.char('Name', size=128, required=True, select=True, translate=True),
        'street': fields.char('Street', size=128, translate=True),
        'street2': fields.char('Street2', size=128, translate=True),
        'city': fields.char('City', size=128, translate=True),
        'create_date': fields.datetime('Creation Date', readonly=True, select=True, help="Date on which sales order is created."),
    } 

class res_country_state(osv.osv):
    _inherit = "res.country.state"
    _columns = {
        'name': fields.char('State Name', size=64, required=True, translate=True,
                            help='Administrative divisions of a country. E.g. Fed. State, Departement, Canton'),
    }